package controllers;

import java.awt.Cursor;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public class MouseHandler implements MouseListener{

	
	private GamePanel gp;
	
	public MouseHandler(GamePanel gamePanel) {
		gp = gamePanel;
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		if(gp.tentPicked == true){
			int player = 0;
			//TODO something to leave the tent into the battlefield
			gp.game.setTentInTile(e.getX(), e.getY(), gp.tent, player);
			gp.setCursor(Cursor.getDefaultCursor());
			gp.tentPicked = false;
		}
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

}
